#ifndef __UTIL_H__
#define __UTIL_H__
#include "types.h"

#define getU1(p)	(U1)(	(p)[0])
#define getU2(p)	(U2)(	(p)[0]<< 8 & 0x0000FF00 |(p)[1] & 0x000000FF)
#define getU4(p)	(U4)(	(U4)(p)[0] << 24 & 0xFF000000 | (U4)(p)[1] << 16 & 0x00FF0000 |		\
						(U4)(p)[2] << 8 & 0x0000FF00 | (U4)(p)[3] & 0x000000FF)


#endif